﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Janus.Windows.GridEX;

namespace EIS.ClientUtility
{
    public static class GridExUtility
    {
        public static void SetColumnOrder(string[] displayColumns, GridEXTable tbl)
        {
           
            for (var i = 0; i < displayColumns.Length; i++)
            {
                if (!tbl.Columns.Contains(displayColumns[i])) continue;
                tbl.Columns[displayColumns[i]].Position = i;
            }
            foreach (GridEXColumn tblColumn in  tbl.Columns)
            {
                if (tblColumn.Position >= displayColumns.Length)
                    tblColumn.Visible = false;
            }
         
        }


    }
}
